﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Activation;
using System.Web;
using Winter.Core.Infrastructure;
using Winter.Core.Service;

namespace Winter.WcfService.Base
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class GenericWcfService<T, ID> : IGenericWcfService<T, ID> where T : class
    {
        private IGenericManager<T, ID> _genericManager;
        public GenericWcfService(IGenericManager<T, ID> genericManager)
        {
            this._genericManager = genericManager;
        }

        //public IGenericManager<T, ID> GenericManager {get;set;}
        
        public List<T> GetAll()
        {
            return this._genericManager.GetAll();
        }

        public T GetByID(ID id)
        {
            throw new NotImplementedException();
        }

        public T Insert(T obj)
        {
            throw new NotImplementedException();
        }

        public T Update(T obj)
        {
            throw new NotImplementedException();
        }

    }
}